package com.hitqz.robot.api.business.model.vo.patrol;

import com.hitqz.robot.api.business.enums.ResultTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * @author wengyx
 * @date 2024/8/7
 * 检测对象
 */
@Schema(description = "巡检对象")
public class PatrolObjectVo {
    @Schema(description = "id")
    private Long id;
    @Schema(description = "巡检项目类型id")
    private Long patrolCheckTypeId;
    @Schema(description = "检测结果类型 0-无返回 1-浮点型 2-单个枚举 3-多个枚举 4-字符串")
    private String resultType;
    @Schema(description = "检测结果类型显示文本")
    private String resultTypeStr;
    @Schema(description = "巡检对象名称")
    private String name;
    @Schema(description = "单位")
    private String unit;
    @Schema(description = "是否需要换算 0-否 1-是")
    private Integer isConvert;
    @Schema(description = "视觉枚举返回结果,逗号隔开，如0,1")
    private String enumResult;
    @Schema(description = "视觉枚举返回结果映射,逗号隔开，如关,开")
    private String enumConvert;
    @Schema(description = "浮点换算量程,逗号隔开,如 10,100")
    private String floatConvert;
    @Schema(description = "小数点后有几位")
    private Integer afterPointCountConvert;

    private String standardTypeStr;



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPatrolCheckTypeId() {
        return patrolCheckTypeId;
    }

    public void setPatrolCheckTypeId(Long patrolCheckTypeId) {
        this.patrolCheckTypeId = patrolCheckTypeId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getIsConvert() {
        return isConvert;
    }

    public void setIsConvert(Integer isConvert) {
        this.isConvert = isConvert;
    }

    public String getEnumResult() {
        return enumResult;
    }

    public void setEnumResult(String enumResult) {
        this.enumResult = enumResult;
    }

    public String getEnumConvert() {
        return enumConvert;
    }

    public void setEnumConvert(String enumConvert) {
        this.enumConvert = enumConvert;
    }

    public String getFloatConvert() {
        return floatConvert;
    }

    public void setFloatConvert(String floatConvert) {
        this.floatConvert = floatConvert;
    }


    public String getResultType() {
        return resultType;
    }

    public void setResultType(String resultType) {
        this.resultType = resultType;
    }

    public String getResultTypeStr() {
        return ResultTypeEnum.CMD_TYPE_DES.get(this.resultType);
    }

    public void setResultTypeStr(String resultTypeStr) {
        this.resultTypeStr = resultTypeStr;
    }

    public String getStandardTypeStr() {
        return standardTypeStr;
    }

    public void setStandardTypeStr(String standardTypeStr) {
        this.standardTypeStr = standardTypeStr;
    }

    public Integer getAfterPointCountConvert() {
        return afterPointCountConvert;
    }

    public void setAfterPointCountConvert(Integer afterPointCountConvert) {
        this.afterPointCountConvert = afterPointCountConvert;
    }

    @Override
    public String toString() {
        return "PatrolObject{" +
                "id=" + id +
                ", patrolCheckTypeId=" + patrolCheckTypeId +
                ", name='" + name + '\'' +
                ", unit='" + unit + '\'' +
                ", isConvert=" + isConvert +
                ", enumResult='" + enumResult + '\'' +
                ", enumConvert='" + enumConvert + '\'' +
                ", floatConvert='" + floatConvert + '\'' +
                '}';
    }
}
